#include <iostream>
#include <math.h>
#include <conio.h>

double f(double x)
{
	return 2*x*x*x*x - 8.0*x*x*x + 8.0*x*x - 1.0;
}

double df(double x)
{
	return 8.0*x*x*x - 24.0*x*x + 16.0*x;
}

int main(int argc, char argv[])
{
	double epsilon = 0.0001;
	double x;				

	std::cout << "Vvedite pervoe priblizenie X = ";
	std::cin >> x;

	do
	{
		x = x - f(x) / df(x);
	} while(fabs(f(x)) > epsilon);

	std::cout << "Resultat: " << x;

	getch();
	
	return 0;
}